(x_write_glyphs): Clear phys_cursor_on_p if current
authorKim F. Storm <storm@cua.dk>
Wed, 22 May 2002 21:17:45 +0000 (21:17 +0000)
committerKim F. Storm <storm@cua.dk>
Wed, 22 May 2002 21:17:45 +0000 (21:17 +0000)
phys_cursor's hpos is overwritten.  This is still not completely
correct, as it doesn't really make sense to use hpos at all to
get the cursor glyph (as that is relative to the width of the
characters on the line, which may have changed during the update).

src/xterm.c

index c87d8981daf06147b8af30d44c61456a9842510d..c98d278c771abbcda554d2412d2297ace2cb8a2d 100644 (file)
@@ -5331,6 +5331,14 @@ x_write_glyphs (start, len)
                     hpos, hpos + len,
                     DRAW_NORMAL_TEXT, 0);
 
+  /* Invalidate old phys cursor if the glyph at its hpos is redrawn.  */
+  if (updated_area == TEXT_AREA
+      && updated_window->phys_cursor_on_p
+      && updated_window->phys_cursor.vpos == output_cursor.vpos
+      && updated_window->phys_cursor.hpos >= hpos
+      && updated_window->phys_cursor.hpos < hpos + len)
+    updated_window->phys_cursor_on_p = 0;
+
   UNBLOCK_INPUT;
   
   /* Advance the output cursor.  */